package blockchain.mystream;

import java.io.IOException;

public interface MyDataOutputStreamInterfaceNoExcept extends MyDataOutputStreamInterface {
    @Override
    default void write(String msg) {
        try {
            MyDataOutputStreamInterface.super.write(msg);
        } catch (IOException e) {
            System.err.println("写入数据时发生错误: " + e.getMessage());
        }
    }
    @Override
    default void writeInt(int v) {
        try {
            MyDataOutputStreamInterface.super.writeInt(v);
        } catch (IOException e) {
            System.err.println("写入数据时发生错误: " + e.getMessage());
        }
    }
}
